//
// Created by jsjxsy on 2022/6/29.
//
#include <stdio.h>
#include <string.h>
int main(void) {
  double data1[100] = {0};
  double data2[300] = {0};
  for (int i = 0; i < 300; i++) {
    data2[i] = (3 * i + 1);
  }
  for (int i = 0; i < 300; i++) {
    printf("data2[%d]=%.1f ", i, data2[i]);
    if ((i != 0) && (i % 10 == 0)) {
      puts("");
    }
  }
  memcpy(data1, data2, sizeof(double) * 100);
  for (int i = 0; i < 100; i++) {
    printf("data1[%d]=%.1f ", i, data1[i]);
    if ((i != 0) && (i % 10 == 0)) {
      puts("");
    }
  }

  memcpy(data1, data2+200, sizeof(double) * 100);
//  for (int i = 0; i < 100; ++i) {
//    data2[i] = data2[200+i];
//  }
//  memcpy(data1, data2, sizeof(double)*100);
  for (int i = 0; i < 100; i++) {
    printf("data1[%d]=%.2f ", i, data1[i]);
    if ((i != 0) && (i % 10 == 0)) {
      puts("");
    }
  }
  return 0;
}
